package annotation02;

/**
 * @注解名(给注解中属性赋值)
 */
@MyAnnotation(name="老王") //在类上使用注解
public class Person {

	@MyAnnotation(name="老李",num=13)//在字段上使用注解
	private int age;

	@MyAnnotation(name="老李",num=13,colors = {"white","black","green"}) //在方法上使用注解
	public int getAge() {
		return age;
	}

	public void setAge(@MyAnnotation(name="菲菲",num=25) int age) {//用在形参age上
		this.age = age;
	}
}
